/*
 * Copyright Notice ====================================================
 * This file contains proprietary information of Hewlett-Packard Co.
 * Copying or reproduction without prior written approval is prohibited.
 * Copyright (c) 2012   All rights reserved. ======================
 */

package com.hp.ecs.xqa.util;

public final class JsonUtil {
	private JsonUtil() {

	}

	public static String serialize(Object object) {
		if ((object instanceof StringBuilder) || (object instanceof StringBuffer)) {
			object = object.toString();
		}
		return new JsonWriter().write(object);
	}

}
